<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>第二步：填写字段信息</title>
  <!-- 新 Bootstrap 核心 CSS 文件 -->
  <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
  <!-- 可选的Bootstrap主题文件（一般不用引入） -->
  <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
  <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
  <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
  <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
  <script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
<body>
  <form method="post" action="/Auto/Index/step3" class="form-inline">
    <h1>第二步：填写字段信息</h1>
    <div class="panel panel-info">
      <div class="panel-heading">
        <h3 class="panel-title">填写字段信息 | model名:<?php echo ($modelName); ?></h3>
      </div>
      <div class="panel-body">
        <table class="table table-striped table-bordered table-hover">
          <tr>
            <th width="5%" style="text-align: center;">编号</th>
            <th width="10%" style="text-align: center;">字段</th>
            <th width="5%"  style="text-align: center;">输入(C)</th>
            <th width="5%"  style="text-align: center;">列表(L)</th>
            <th width="5%"  style="text-align: center;">详情(D)</th>
            <th width="5%"  style="text-align: center;">必填(C)</th>
            <th width="5%"  style="text-align: center;">搜索(S)</th>
            <th width="5%"  style="text-align: center;">导出(E)</th>
            <th style="text-align: center;">名称</th>
            <th width="10%" style="text-align: center;">类型</th>
            <th width="25%" style="text-align: center;">内容</th>
          </tr>
          <?php if(is_array($modelFields)): $k = 0; $__LIST__ = $modelFields;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><tr>
              <td style="text-align: center;"><?php echo ($k); ?></td>
              <td style="text-align: center;"><?php echo ($vo['field']); ?></td>
              <td style="text-align: center;">
                <input type="checkbox" name="<?php echo ($vo['field']); ?>[input_a]" value="1" <?php if($vo['fieldInput']): ?>checked<?php endif; ?>
              >
            </td>
            <td style="text-align: center;">
                <input type="checkbox" name="<?php echo ($vo['field']); ?>[list_a]" <?php if($vo['fieldList']): ?>checked<?php endif; ?> value="1"></td>
            <td style="text-align: center;">
                <input type="checkbox" name="<?php echo ($vo['field']); ?>[detail_a]" <?php if($vo['fieldDetail']): ?>checked<?php endif; ?> value="1"></td>
            <td style="text-align: center;">
              <input type="checkbox" name="<?php echo ($vo['field']); ?>[required_a]" checked value="1"></td>
            <td style="text-align: center;">
              <input type="checkbox" name="<?php echo ($vo['field']); ?>[search_a]" value="1" <?php if($vo['fieldSearch']): ?>checked<?php endif; ?>
            >
          <td style="text-align: center;">
              <input type="checkbox" name="<?php echo ($vo['field']); ?>[excel_a]" value="1">
          </td>

          <td style="text-align: center;">
            <input type="text" class="form-control" name="<?php echo ($vo['field']); ?>[name_a]" value="<?php echo ($vo['fieldName']); ?>" placeholder="字段名称"></td>
          <td style="text-align: center;">
            <select class="form-control" name="<?php echo ($vo['field']); ?>[type_a]">
              <option value="input">文本行</option>
              <option value="password">密码行</option>
              <option value="textarea">文本框</option>
              <option value="ueditor">富文本框</option>
              <option value="file">文件</option>
              <option value="select">下拉选择框</option>
              <option value="foreign">关联外键</option>
              <option value="date">日期选择</option>
              <option value="datetime">日期时间</option>
            </select>
          </td>
          <td style="text-align: center;">
            <input type="text" class="form-control" style="width:100%;" name="<?php echo ($vo['field']); ?>[content_a]" placeholder="选(内容1,内容2,...)外(表,id,name,input/select)"></td>
        </tr><?php endforeach; endif; else: echo "" ;endif; ?>
    </table>
    <hr/>
    <div class="row">
      <div class="col-md-1">
        <h4>必填项</h4>
      </div>
      <div class="col-md-1">
        <div class="checkbox">
          <label>
            <input type="checkbox" value="2" name="file_a" checked="" class="btn btn-info"/>
            <h4 style="display:inline-block;">生成文件</h4>
          </label>
          <label>
            <input type="checkbox" value="2" name="notAuthority_a" checked="" class="btn btn-info"/>
            <h4 style="display:inline-block;">验证权限</h4>
          </label>
          <label>
            <input type="checkbox" value="2" name="excel_a" class="btn btn-info"/>
            <h4 style="display:inline-block;">导入/导出</h4>
          </label>
          <label>
            <input type="checkbox" value="2" name="delete_a" checked="" class="btn btn-info"/>
            <h4 style="display:inline-block;">删除按钮</h4>
          </label>
          <label>
            <input type="checkbox" value="2" name="update_a" checked="" class="btn btn-info"/>
            <h4 style="display:inline-block;">修改按钮</h4>
          </label>
          <label>
            <input type="checkbox" value="2" name="detail_a" checked="" class="btn btn-info"/>
            <h4 style="display:inline-block;">详情按钮</h4>
          </label>
        </div>
      </div>
      <div class="col-md-2">
        <div class="form-group">
          <input type="text" class="form-control" name="name_a" placeholder="名称(例:user->用户)"></div>
      </div>
      <div class="col-md-2">
        <div class="form-group">
          <input type="text" class="form-control" name="icon_a" placeholder="图标(icon)"></div>
      </div>
      <div class="col-md-2">
        <input type="submit" value="下一步" class="btn btn-info" style="margin-right: 1%;" />
        <a class="btn btn-default" href="/Auto/Index/step1" style="margin-right: 1%;">返回</a>
      </div>
    </div>
  </div>
</div>
</form>
</body>
</html>